import React, { Component } from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import { Provider } from 'react-redux';
import store from './store';
export default class Page extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }
    async componentDidMount() {
        const { default: Home } = await import('./home');
        this.setState({ Home })
    }
    // 页面内容
    render() {
        const { Home } = this.state;
        return (
            <Provider store={store}>
                <BrowserRouter>
                    <Switch>
                        {Home && <Route path='/' component={Home} />}
                    </Switch>
                </BrowserRouter>
            </Provider>
        );
    }
}
